package com.hps.ssh.dao.impl;

import com.hps.ssh.dao.IStudentDao;
import com.hps.ssh.entity.Student;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
public class StudentDaoImpl implements IStudentDao {

    @Autowired
    private SessionFactory sessionFactory;

    @Override
    public void add(Student student) {
        sessionFactory.getCurrentSession().save(student);
    }
}
